import 'package:app_core/app_core.dart';
import '../managers/user_manager.dart';
import 'storage_util.dart';

/// 项目级能力提供者实现
class ProjectInterface implements CoreInterface {
  @override
  Future<String?> getToken() async => StorageUtil.getUserToken();

  @override
  Future<String?> getUserId() async {
    final userManager = UserManager.instance;
    return userManager.userId;
  }

  @override
  String getCurrentLocale() => 'zh';

  @override
  Future<Map<String, String>> getCustomHeaders() async => {
    'X-Project': 'YH',
    // 其它自定义header
  };
}